using Senparc.Weixin.Entities;
using Senparc.Weixin.MP.AdvancedAPIs.Semantic;
using Senparc.Weixin.MP.CommonAPIs;
using System;
namespace Senparc.Weixin.MP.AdvancedAPIs
{
	public static class SemanticApi
	{
		public static T SemanticSend<T>(string accessTokenOrAppId, SemanticPostData semanticPostData, int timeOut = 10000) where T : WxJsonResult
		{
			return ApiHandlerWapper.TryCommonApi<T>(delegate(string accessToken)
			{
				string urlFormat = "https://api.weixin.qq.com/semantic/semproxy/search?access_token={0}";
				return CommonJsonSend.Send<T>(accessToken, urlFormat, semanticPostData, CommonJsonSendType.POST, timeOut, false);
			}, accessTokenOrAppId, true);
		}
	}
}
